package com.cd.hospital.modules.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.cd.hospital.modules.dao.AdvertisementDao;
import com.cd.hospital.modules.entity.AdvertisementEntity;
import com.cd.hospital.modules.service.AdvertisementService;



@Service("advertisementService")
public class AdvertisementServiceImpl implements AdvertisementService {
	@Autowired
	private AdvertisementDao advertisementDao;
	
	@Override
	public AdvertisementEntity queryObject(Long id){
		return advertisementDao.queryObject(id);
	}
	
	@Override
	public List<AdvertisementEntity> queryList(Map<String, Object> map){
		return advertisementDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return advertisementDao.queryTotal(map);
	}
	
	@Override
	public void save(AdvertisementEntity advertisement){
		advertisementDao.save(advertisement);
	}
	
	@Override
	public void update(AdvertisementEntity advertisement){
		advertisement.setUppateDate(new Date());
		advertisementDao.update(advertisement);
	}
	
	@Override
	public void delete(Long id){
		advertisementDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		advertisementDao.deleteBatch(ids);
	}



}
